<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow: flow::net_flow::Congestion_control_selector Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow<span id="projectnumber">&#160;2.0.0</span>
   </div>
   <div id="projectbrief">Flow project: Full implementation reference.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceflow.html">flow</a></li><li class="navelem"><a class="el" href="namespaceflow_1_1net__flow.html">net_flow</a></li><li class="navelem"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__selector.html">Congestion_control_selector</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-static-attribs">Static Private Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classflow_1_1net__flow_1_1Congestion__control__selector-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">flow::net_flow::Congestion_control_selector Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Namespace-like class that enables an <code>enum</code>-based selection of the <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html" title="The abstract interface for a per-socket module that determines the socket&#39;s congestion control behavi...">Congestion_control_strategy</a> interface implementation to use for a given socket (for programmatic socket options) and facilitates stream I/O of these enums (allowing parsing and outputting these socket options).  
 <a href="classflow_1_1net__flow_1_1Congestion__control__selector.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="cong__ctl_8hpp_source.html">cong_ctl.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for flow::net_flow::Congestion_control_selector:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1net__flow_1_1Congestion__control__selector__inherit__graph.svg" width="178" height="119"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for flow::net_flow::Congestion_control_selector:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1net__flow_1_1Congestion__control__selector__coll__graph.svg" width="886" height="172"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:acb937e24cf041aa15c5e92c2550ac4ec"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__selector.html#acb937e24cf041aa15c5e92c2550ac4ec">Strategy_choice</a> = <a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html#a42ce94dbc5d8be28134261c2eb18b245">Peer_socket_options::Congestion_control_strategy_choice</a></td></tr>
<tr class="memdesc:acb937e24cf041aa15c5e92c2550ac4ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Short-hand for Peer_socket_options::Congestion_control_strategy.  <a href="classflow_1_1net__flow_1_1Congestion__control__selector.html#acb937e24cf041aa15c5e92c2550ac4ec">More...</a><br /></td></tr>
<tr class="separator:acb937e24cf041aa15c5e92c2550ac4ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a52eee18d41c3f9cc7d6c48b766a7919f"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html">Congestion_control_strategy</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__selector.html#a52eee18d41c3f9cc7d6c48b766a7919f">create_strategy</a> (<a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html#a42ce94dbc5d8be28134261c2eb18b245">Strategy_choice</a> strategy_choice, <a class="el" href="classflow_1_1log_1_1Logger.html">log::Logger</a> *logger_ptr, <a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#aef7998db71c60eeb5d1e3d1a97c14886">Peer_socket::Const_ptr</a> sock)</td></tr>
<tr class="memdesc:a52eee18d41c3f9cc7d6c48b766a7919f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Factory method that, given an <code>enum</code> identifying the desired strategy, allocates the appropriate <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html" title="The abstract interface for a per-socket module that determines the socket&#39;s congestion control behavi...">Congestion_control_strategy</a> subclass instance on the heap and returns a pointer to it.  <a href="classflow_1_1net__flow_1_1Congestion__control__selector.html#a52eee18d41c3f9cc7d6c48b766a7919f">More...</a><br /></td></tr>
<tr class="separator:a52eee18d41c3f9cc7d6c48b766a7919f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca9ae5272088f3ef8fb81f40cc85224c"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__selector.html#aca9ae5272088f3ef8fb81f40cc85224c">get_ids</a> (std::vector&lt; std::string &gt; *ids)</td></tr>
<tr class="memdesc:aca9ae5272088f3ef8fb81f40cc85224c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a list of strings, called IDs, each of which textually represents a distinct <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html" title="The abstract interface for a per-socket module that determines the socket&#39;s congestion control behavi...">Congestion_control_strategy</a> subclass.  <a href="classflow_1_1net__flow_1_1Congestion__control__selector.html#aca9ae5272088f3ef8fb81f40cc85224c">More...</a><br /></td></tr>
<tr class="separator:aca9ae5272088f3ef8fb81f40cc85224c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-methods" name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a3b71a9061f48a6ce57e4acd29328f67a"><td class="memItemLeft" align="right" valign="top"><a id="a3b71a9061f48a6ce57e4acd29328f67a" name="a3b71a9061f48a6ce57e4acd29328f67a"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Congestion_control_selector</b> ()=delete</td></tr>
<tr class="memdesc:a3b71a9061f48a6ce57e4acd29328f67a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Forbid all instantiation. <br /></td></tr>
<tr class="separator:a3b71a9061f48a6ce57e4acd29328f67a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-static-attribs" name="pri-static-attribs"></a>
Static Private Attributes</h2></td></tr>
<tr class="memitem:aaa68a02633d67e11bdf7e8e722370ca2"><td class="memItemLeft" align="right" valign="top">static const std::map&lt; std::string, <a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html#a42ce94dbc5d8be28134261c2eb18b245">Strategy_choice</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__selector.html#aaa68a02633d67e11bdf7e8e722370ca2">S_ID_TO_STRATEGY_MAP</a></td></tr>
<tr class="memdesc:aaa68a02633d67e11bdf7e8e722370ca2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maps each ID to the corresponding <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__selector.html#acb937e24cf041aa15c5e92c2550ac4ec" title="Short-hand for Peer_socket_options::Congestion_control_strategy.">Strategy_choice</a> <code>enum</code> value.  <a href="classflow_1_1net__flow_1_1Congestion__control__selector.html#aaa68a02633d67e11bdf7e8e722370ca2">More...</a><br /></td></tr>
<tr class="separator:aaa68a02633d67e11bdf7e8e722370ca2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a590c0877dd8751b190173ed9f01d23c7"><td class="memItemLeft" align="right" valign="top">static const std::map&lt; <a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html#a42ce94dbc5d8be28134261c2eb18b245">Strategy_choice</a>, std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__selector.html#a590c0877dd8751b190173ed9f01d23c7">S_STRATEGY_TO_ID_MAP</a></td></tr>
<tr class="memdesc:a590c0877dd8751b190173ed9f01d23c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">The inverse of <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__selector.html#aaa68a02633d67e11bdf7e8e722370ca2" title="Maps each ID to the corresponding Strategy_choice enum value.">S_ID_TO_STRATEGY_MAP</a>.  <a href="classflow_1_1net__flow_1_1Congestion__control__selector.html#a590c0877dd8751b190173ed9f01d23c7">More...</a><br /></td></tr>
<tr class="separator:a590c0877dd8751b190173ed9f01d23c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="friends" name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:aa4e29e3faa67810804c3053b8ed33380"><td class="memItemLeft" align="right" valign="top">std::istream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__selector.html#aa4e29e3faa67810804c3053b8ed33380">operator&gt;&gt;</a> (std::istream &amp;is, <a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html#a42ce94dbc5d8be28134261c2eb18b245">Congestion_control_selector::Strategy_choice</a> &amp;strategy_choice)</td></tr>
<tr class="memdesc:aa4e29e3faa67810804c3053b8ed33380"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deserializes a <a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html#a42ce94dbc5d8be28134261c2eb18b245" title="The possible choices for congestion control strategy for the socket.">Peer_socket_options::Congestion_control_strategy_choice</a> <code>enum</code> from a standard input stream.  <a href="classflow_1_1net__flow_1_1Congestion__control__selector.html#aa4e29e3faa67810804c3053b8ed33380">More...</a><br /></td></tr>
<tr class="separator:aa4e29e3faa67810804c3053b8ed33380"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b2749c14e5458e40eb2d40d0d4f1144"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__selector.html#a0b2749c14e5458e40eb2d40d0d4f1144">operator&lt;&lt;</a> (std::ostream &amp;os, const <a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html#a42ce94dbc5d8be28134261c2eb18b245">Congestion_control_selector::Strategy_choice</a> &amp;strategy_choice)</td></tr>
<tr class="memdesc:a0b2749c14e5458e40eb2d40d0d4f1144"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serializes a <a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html#a42ce94dbc5d8be28134261c2eb18b245" title="The possible choices for congestion control strategy for the socket.">Peer_socket_options::Congestion_control_strategy_choice</a> <code>enum</code> to a standard <code>ostream</code> &ndash; the reverse of <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__selector.html#aa4e29e3faa67810804c3053b8ed33380" title="Deserializes a Peer_socket_options::Congestion_control_strategy_choice enum from a standard input str...">operator&gt;&gt;()</a>.  <a href="classflow_1_1net__flow_1_1Congestion__control__selector.html#a0b2749c14e5458e40eb2d40d0d4f1144">More...</a><br /></td></tr>
<tr class="separator:a0b2749c14e5458e40eb2d40d0d4f1144"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Namespace-like class that enables an <code>enum</code>-based selection of the <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html" title="The abstract interface for a per-socket module that determines the socket&#39;s congestion control behavi...">Congestion_control_strategy</a> interface implementation to use for a given socket (for programmatic socket options) and facilitates stream I/O of these enums (allowing parsing and outputting these socket options). </p>
<h3>Provided facilities</h3>
<ul>
<li>Create <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html" title="The abstract interface for a per-socket module that determines the socket&#39;s congestion control behavi...">Congestion_control_strategy</a> subclass instance based on <code>enum</code> value;</li>
<li>Return set of possible text IDs, each representing a distinct <code>enum</code> value;</li>
<li>Read such an ID from an <code>istream</code> into an <code>enum</code> value; write an ID from an <code>enum</code> value to an <code>ostream</code>. </li>
</ul>

<p class="definition">Definition at line <a class="el" href="cong__ctl_8hpp_source.html#l00446">446</a> of file <a class="el" href="cong__ctl_8hpp_source.html">cong_ctl.hpp</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="acb937e24cf041aa15c5e92c2550ac4ec" name="acb937e24cf041aa15c5e92c2550ac4ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb937e24cf041aa15c5e92c2550ac4ec">&#9670;&nbsp;</a></span>Strategy_choice</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html#a42ce94dbc5d8be28134261c2eb18b245">flow::net_flow::Congestion_control_selector::Strategy_choice</a> =  <a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html#a42ce94dbc5d8be28134261c2eb18b245">Peer_socket_options::Congestion_control_strategy_choice</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Short-hand for Peer_socket_options::Congestion_control_strategy. </p>

<p class="definition">Definition at line <a class="el" href="cong__ctl_8hpp_source.html#l00453">453</a> of file <a class="el" href="cong__ctl_8hpp_source.html">cong_ctl.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a52eee18d41c3f9cc7d6c48b766a7919f" name="a52eee18d41c3f9cc7d6c48b766a7919f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a52eee18d41c3f9cc7d6c48b766a7919f">&#9670;&nbsp;</a></span>create_strategy()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html">Congestion_control_strategy</a> * flow::net_flow::Congestion_control_selector::create_strategy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html#a42ce94dbc5d8be28134261c2eb18b245">Strategy_choice</a>&#160;</td>
          <td class="paramname"><em>strategy_choice</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classflow_1_1log_1_1Logger.html">log::Logger</a> *&#160;</td>
          <td class="paramname"><em>logger_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classflow_1_1util_1_1Shared__ptr__alias__holder.html#aef7998db71c60eeb5d1e3d1a97c14886">Peer_socket::Const_ptr</a>&#160;</td>
          <td class="paramname"><em>sock</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Factory method that, given an <code>enum</code> identifying the desired strategy, allocates the appropriate <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html" title="The abstract interface for a per-socket module that determines the socket&#39;s congestion control behavi...">Congestion_control_strategy</a> subclass instance on the heap and returns a pointer to it. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">strategy_choice</td><td>The type of strategy (congestion control algorithm) to use. </td></tr>
    <tr><td class="paramname">logger_ptr</td><td>The Logger implementation to use subsequently. </td></tr>
    <tr><td class="paramname">sock</td><td>The <a class="el" href="classflow_1_1net__flow_1_1Peer__socket.html" title="A peer (non-server) socket operating over the Flow network protocol, with optional stream-of-bytes an...">Peer_socket</a> for which this module will control congestion policy. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Pointer to newly allocated instance. </dd></dl>

<p class="definition">Definition at line <a class="el" href="cong__ctl_8cpp_source.html#l00100">100</a> of file <a class="el" href="cong__ctl_8cpp_source.html">cong_ctl.cpp</a>.</p>

<p class="reference">References <a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html#a42ce94dbc5d8be28134261c2eb18b245a13d31c1bffdbda8309c52bb997064862">flow::net_flow::Peer_socket_options::S_CLASSIC</a>, and <a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html#a42ce94dbc5d8be28134261c2eb18b245a656db2a2ff0f24f703b6ac341e97537e">flow::net_flow::Peer_socket_options::S_CLASSIC_BANDWIDTH_ESTIMATED</a>.</p>

<p class="reference">Referenced by <a class="el" href="peer__socket_8cpp_source.html#l03957">flow::net_flow::Node::connect_worker()</a>, and <a class="el" href="server__socket_8cpp_source.html#l00430">flow::net_flow::Node::handle_syn_to_listening_server()</a>.</p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1net__flow_1_1Congestion__control__selector_a52eee18d41c3f9cc7d6c48b766a7919f_icgraph.svg" width="966" height="120"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<a id="aca9ae5272088f3ef8fb81f40cc85224c" name="aca9ae5272088f3ef8fb81f40cc85224c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aca9ae5272088f3ef8fb81f40cc85224c">&#9670;&nbsp;</a></span>get_ids()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void flow::net_flow::Congestion_control_selector::get_ids </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; std::string &gt; *&#160;</td>
          <td class="paramname"><em>ids</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns a list of strings, called IDs, each of which textually represents a distinct <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__strategy.html" title="The abstract interface for a per-socket module that determines the socket&#39;s congestion control behavi...">Congestion_control_strategy</a> subclass. </p>
<p >You can output this in socket option help text as the possible choices for congestion control strategy. They will match the possible text inputs to <code>operator&gt;&gt;(istream&amp;, Strategy_choice&amp;)</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ids</td><td>The <code>vector</code> of strings to clear and fill with the above. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="cong__ctl_8cpp_source.html#l00115">115</a> of file <a class="el" href="cong__ctl_8cpp_source.html">cong_ctl.cpp</a>.</p>

<p class="reference">References <a class="el" href="cong__ctl_8hpp_source.html#l00496">S_ID_TO_STRATEGY_MAP</a>.</p>

<p class="reference">Referenced by <a class="el" href="options_8cpp_source.html#l00271">flow::net_flow::Peer_socket_options::setup_config_parsing_helper()</a>.</p>
<div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classflow_1_1net__flow_1_1Congestion__control__selector_aca9ae5272088f3ef8fb81f40cc85224c_icgraph.svg" width="764" height="131"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>

</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a id="a0b2749c14e5458e40eb2d40d0d4f1144" name="a0b2749c14e5458e40eb2d40d0d4f1144"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0b2749c14e5458e40eb2d40d0d4f1144">&#9670;&nbsp;</a></span>operator&lt;&lt;</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::ostream &amp; operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>os</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html#a42ce94dbc5d8be28134261c2eb18b245">Congestion_control_selector::Strategy_choice</a> &amp;&#160;</td>
          <td class="paramname"><em>strategy_choice</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Serializes a <a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html#a42ce94dbc5d8be28134261c2eb18b245" title="The possible choices for congestion control strategy for the socket.">Peer_socket_options::Congestion_control_strategy_choice</a> <code>enum</code> to a standard <code>ostream</code> &ndash; the reverse of <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__selector.html#aa4e29e3faa67810804c3053b8ed33380" title="Deserializes a Peer_socket_options::Congestion_control_strategy_choice enum from a standard input str...">operator&gt;&gt;()</a>. </p>
<p >Writes a space-less token to the given stream based on the given strategy <code>enum</code> value. This enables a few key things to work, including output of defaults and values in the help via <a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html" title="A set of low-level options affecting a single Peer_socket.">Peer_socket_options</a>, and conversion to <code>string</code> via <code>boost::lexical_cast</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">os</td><td>Stream to which to serialize. </td></tr>
    <tr><td class="paramname">strategy_choice</td><td>Value to serialize. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>os</code>. </dd></dl>

<p class="definition">Definition at line <a class="el" href="cong__ctl_8cpp_source.html#l00146">146</a> of file <a class="el" href="cong__ctl_8cpp_source.html">cong_ctl.cpp</a>.</p>

</div>
</div>
<a id="aa4e29e3faa67810804c3053b8ed33380" name="aa4e29e3faa67810804c3053b8ed33380"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa4e29e3faa67810804c3053b8ed33380">&#9670;&nbsp;</a></span>operator&gt;&gt;</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::istream &amp; operator&gt;&gt; </td>
          <td>(</td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>is</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html#a42ce94dbc5d8be28134261c2eb18b245">Congestion_control_selector::Strategy_choice</a> &amp;&#160;</td>
          <td class="paramname"><em>strategy_choice</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Deserializes a <a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html#a42ce94dbc5d8be28134261c2eb18b245" title="The possible choices for congestion control strategy for the socket.">Peer_socket_options::Congestion_control_strategy_choice</a> <code>enum</code> from a standard input stream. </p>
<p >Reads a single space-delimited token from the given stream. Maps that token to an aforementioned enumeration value. If the token is not recognized or cannot be read, some reasonable default strategy is chosen. This enables a few key things to work, including parsing from config file/command line via and conversion from <code>string</code> via <code>boost::lexical_cast</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">is</td><td>Stream from which to deserialize. </td></tr>
    <tr><td class="paramname">strategy_choice</td><td>Reference to <code>enum</code> value which to set to the mapped strategy. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>is</code>.</dd></dl>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000118">Todo:</a></b></dt><dd><a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html#a42ce94dbc5d8be28134261c2eb18b245" title="The possible choices for congestion control strategy for the socket.">Peer_socket_options::Congestion_control_strategy_choice</a> stream inserter <code>&lt;&lt;</code> and <code>&gt;&gt;</code> operators should use the <a class="el" href="namespaceflow_1_1util.html#a18a29d6a6e65c3b96c52b5cad5971266" title="Deserializes an enum class value from a standard input stream.">flow::util::istream_to_enum()</a> pattern which is much easier than the overwrought old thing in there now involving two <code>map</code>s. Perhaps add a generic <code>enum_to_strings()</code> to provide the body for <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__selector.html#aca9ae5272088f3ef8fb81f40cc85224c" title="Returns a list of strings, called IDs, each of which textually represents a distinct Congestion_contr...">net_flow::Congestion_control_selector::get_ids()</a>. </dd></dl>

<p class="definition">Definition at line <a class="el" href="cong__ctl_8cpp_source.html#l00124">124</a> of file <a class="el" href="cong__ctl_8cpp_source.html">cong_ctl.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="aaa68a02633d67e11bdf7e8e722370ca2" name="aaa68a02633d67e11bdf7e8e722370ca2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaa68a02633d67e11bdf7e8e722370ca2">&#9670;&nbsp;</a></span>S_ID_TO_STRATEGY_MAP</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const std::map&lt; std::string, <a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html#a42ce94dbc5d8be28134261c2eb18b245">Congestion_control_selector::Strategy_choice</a> &gt; flow::net_flow::Congestion_control_selector::S_ID_TO_STRATEGY_MAP</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Maps each ID to the corresponding <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__selector.html#acb937e24cf041aa15c5e92c2550ac4ec" title="Short-hand for Peer_socket_options::Congestion_control_strategy.">Strategy_choice</a> <code>enum</code> value. </p>

<p class="definition">Definition at line <a class="el" href="cong__ctl_8hpp_source.html#l00496">496</a> of file <a class="el" href="cong__ctl_8hpp_source.html">cong_ctl.hpp</a>.</p>

<p class="reference">Referenced by <a class="el" href="cong__ctl_8cpp_source.html#l00115">get_ids()</a>.</p>

</div>
</div>
<a id="a590c0877dd8751b190173ed9f01d23c7" name="a590c0877dd8751b190173ed9f01d23c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a590c0877dd8751b190173ed9f01d23c7">&#9670;&nbsp;</a></span>S_STRATEGY_TO_ID_MAP</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const std::map&lt; <a class="el" href="structflow_1_1net__flow_1_1Peer__socket__options.html#a42ce94dbc5d8be28134261c2eb18b245">Congestion_control_selector::Strategy_choice</a>, std::string &gt; flow::net_flow::Congestion_control_selector::S_STRATEGY_TO_ID_MAP</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>The inverse of <a class="el" href="classflow_1_1net__flow_1_1Congestion__control__selector.html#aaa68a02633d67e11bdf7e8e722370ca2" title="Maps each ID to the corresponding Strategy_choice enum value.">S_ID_TO_STRATEGY_MAP</a>. </p>

<p class="definition">Definition at line <a class="el" href="cong__ctl_8hpp_source.html#l00498">498</a> of file <a class="el" href="cong__ctl_8hpp_source.html">cong_ctl.hpp</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>net_flow/detail/<a class="el" href="cong__ctl_8hpp_source.html">cong_ctl.hpp</a></li>
<li>net_flow/detail/<a class="el" href="cong__ctl_8cpp_source.html">cong_ctl.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 28 2025 22:55:35 for Flow by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
